package com.example.db;

import io.vertx.core.Vertx;
import io.vertx.ext.jdbc.JDBCClient;
import io.vertx.core.json.JsonObject;

public class DatabaseConfig {
    public static JDBCClient createClient(Vertx vertx) {
        JsonObject config = new JsonObject()
            .put("url", "jdbc:postgresql://localhost:5432/mydb")
            .put("driver_class", "org.postgresql.Driver")
            .put("user", "postgres")
            .put("password", "your_password")
            .put("max_pool_size", 30);
        return JDBCClient.createShared(vertx, config);
    }
}